﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="DrugLibList.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.DrugLibManage.DrugLibList" %>

<%@ Register Src="../../Controls/ucSource.ascx" TagName="ucSource" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" language="javascript">
        function insertHospitalInfo(HospitalInfo) {
            var arrayInfo = HospitalInfo.split('|');
            document.all.ctl00_ContentPlaceHolder1_txtHospitalName.value = arrayInfo[1];
            document.all.ctl00_ContentPlaceHolder1_hdnHospitalName.value = arrayInfo[1];
            document.all.ctl00_ContentPlaceHolder1_hdnHospitalID.value = arrayInfo[0];
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">医疗机构采购目录</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblProductName" runat="server" Text="产品名称："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtProductName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="Label1" runat="server" Text="产品编号："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblOutLook" runat="server" Text="规格型号："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtOutLook" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lbl2" runat="server" Text="医疗机构："></asp:Label>
                            </td>
                            <td align="left" colspan="1">

                                <asp:TextBox ID="txtHospitalName" Enabled="false" runat="server"></asp:TextBox>
                                <input id="btnSelectHospital" type="button" value="选择医疗机构" class="btn" onclick="window.open('HospitalSelect.aspx', 'selectHospital', 'width=600,height=400,resizable=1,scrollbars=1, status=0, toolbar=0, menubar=0')" />
                            </td>
                            <%--<td align="right">
                                <asp:Label ID="lblProject" runat="server" Text="项目："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlProject" runat="server">
                                </asp:DropDownList>
                            </td>--%>
                            <td align="right">拼音码：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtpinyincode" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label Text="项目：" ID="lblProjectid" runat="server" />
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlProjectid" runat="server">
                                    <asp:ListItem Value="0002">2014年内蒙古自治区网上高值医用耗材阳光采购项目</asp:ListItem>
                                    <asp:ListItem Value="0001">2012年内蒙古自治区网上医用耗材采购项目</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <asp:Literal ID="ltlAdvance" runat="server" Text="&lt;tbody id='advance' style='display:none'&gt;"></asp:Literal>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblProduceCompany" runat="server" Text="生产企业："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtCompanyname_Sc" runat="server"></asp:TextBox>
                            </td>
                                                        <td align="right">
                                <asp:Label ID="lblProductType" runat="server" Text="产品类别："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtSortName" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" colspan="2">
                                <uc1:ucSource ID="ucSource1" runat="server" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    <input type="hidden" runat="server" id="hdnHospitalID" />
                    <input id="hdnHospitalName" type="hidden" runat="server" />
                    <hz:HzButton ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" Width="40px"
                        CssClass="btn" />
                    <hz:HzLinkButton ID="lbnSwitch" runat="server" CommandArgument="simple" Text="高级查询"
                        OnClick="lbnSwitch_Click"></hz:HzLinkButton>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwProduceCatalog" runat="server" CssClass="mainlist" AutoGenerateColumns="False"
        EmptyDataText="暂无符合条件的数据！" onrowdatabound="gvwProduceCatalog_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %>
                </ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:BoundField DataField="GoodsID" HeaderText="产品编号" />

            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" />

            <asp:BoundField DataField="Material" HeaderText="产品材质" NullDisplayText="无" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格型号" />
            <%--            <asp:BoundField DataField="Factor" HeaderText="转换系数" />--%>
            <asp:BoundField DataField="Unit" HeaderText="最小计量单位" />
            <asp:BoundField DataField="PackUnit" HeaderText="包装单位" />
            <asp:BoundField DataField="Pack" HeaderText="包装" Visible="false" />
            <asp:BoundField DataField="SortName" HeaderText="产品类别" Visible="false" />
            <asp:TemplateField HeaderText="采购限价">
                <ItemTemplate>
                    <asp:Label ID="lblbidprice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("procureprice")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="产品属性">
                <ItemTemplate>
                    <%# HZ.DrugTrade.Web.Function.FormatDrugSource( Eval("SortSource")) %>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
            </asp:TemplateField>
            <asp:BoundField DataField="CompanyName_TB" HeaderText="投标企业" Visible="false" />
            <asp:BoundField DataField="CompanyName_SC" HeaderText="生产企业" />
            <asp:BoundField DataField="CompanyNames_PS" HeaderText="配送企业" Visible="False" />
            <asp:BoundField DataField="ProjectName" HeaderText="项目" />
            <asp:BoundField DataField="HospitalName" HeaderText="医疗机构" />
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <hz:HzLinkButton ID="btnSelect" runat="server" OnClientClick='<%# GetURLScript("PurchaseCompanyUpdate.aspx?procureCatalogId="+Eval("ProcureCatalogID")+"&CompanyID_PS="+Eval("CompanyID_PS")+"&HospitalID="+Eval("HospitalID"))%>'
                        CausesValidation="false" Text='<img src="../../lib/images/setting.gif" align="middle" alt="" >设置配送'
                        ToolTip="点击进入修改配送企业" OperateType="编辑" />
                </ItemTemplate>
                <HeaderStyle Width="65px" />
            </asp:TemplateField>
            <asp:BoundField DataField="ProcureStartTime" HeaderText="采购开始时间" DataFormatString="{0:d}"
                Visible="False" />
            <asp:BoundField DataField="ProcureEndTime" HeaderText="采购结束时间" DataFormatString="{0:d}"
                Visible="False" />
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnExport" runat="server" Text="导出Excel" CssClass="btn" ToolTip="导出Excel"
            OnClick="btnExport_Click" />
    </div>
    <div class="listip">
        <ul>
            <li>提示：<span>由于数据量庞大，请先选择要查询的医疗机构再操作。</span></li>
        </ul>
    </div>
</asp:Content>
